package com.shsxt.model;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;


public class UserInfo {
	private String phoneNumber;
	private String headPortrait;
	private Integer age;
	private String petName;
	private String sex;
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date birthday;
	private String userType;
	private String user_ID;
	private String memberLevel;
	private Integer points;
	private Float memberBalance;
	private String openid;
	private String token;
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private String time;
	private String notified;
	@JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private String nianka;


	public String getNianka() {
		return nianka;
	}
	public void setNianka(Date nianka) {
		this.nianka = new SimpleDateFormat("yyyy-MM-dd").format(nianka);
	}
	public UserInfo(String phoneNumber, String headPortrait, Integer age, String petName, String sex, Date birthday,
			String userType, String user_ID, String memberLevel, Integer points, Float memberBalance, String openid,
			String token, String time, String notified, String nianka) {
		super();
		this.phoneNumber = phoneNumber;
		this.headPortrait = headPortrait;
		this.age = age;
		this.petName = petName;
		this.sex = sex;
		this.birthday = birthday;
		this.userType = userType;
		this.user_ID = user_ID;
		this.memberLevel = memberLevel;
		this.points = points;
		this.memberBalance = memberBalance;
		this.openid = openid;
		this.token = token;
		this.time = time;
		this.notified = notified;
		this.nianka = nianka;
	}
	@Override
	public String toString() {
		return "UserInfo [phoneNumber=" + phoneNumber + ", headPortrait=" + headPortrait + ", age=" + age + ", petName="
				+ petName + ", sex=" + sex + ", birthday=" + birthday + ", userType=" + userType + ", user_ID="
				+ user_ID + ", memberLevel=" + memberLevel + ", points=" + points + ", memberBalance=" + memberBalance
				+ ", openid=" + openid + ", token=" + token + ", time=" + time + ", notified=" + notified + ", nianka="
				+ nianka + "]";
	}
	public String getNotified() {
		return notified;
	}
	public void setNotified(String notified) {
		this.notified = notified;
	}
	
	public String getToken() {
		return token;
	}
	public void setToken(String token) {
		this.token = token;
	}
	public String getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(time);
	}
	
	public String getOpenid() {
		return openid;
	}
	public void setOpenid(String openid) {
		this.openid = openid;
	}
	

	public UserInfo() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public String getPhoneNumber() {
		return phoneNumber;
	}
	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}
	public String getHeadPortrait() {
		return headPortrait;
	}
	public void setHeadPortrait(String headPortrait) {
		this.headPortrait = headPortrait;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public String getPetName() {
		return petName;
	}
	public void setPetName(String petName) {
		this.petName = petName;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getUserType() {
		return userType;
	}
	public void setUserType(String userType) {
		this.userType = userType;
	}
	public String getUser_ID() {
		return user_ID;
	}
	public void setUser_ID(String user_ID) {
		this.user_ID = user_ID;
	}
	public String getMemberLevel() {
		return memberLevel;
	}
	public void setMemberLevel(String memberLevel) {
		this.memberLevel = memberLevel;
	}
	public Integer getPoints() {
		return points;
	}
	public void setPoints(Integer points) {
		this.points = points;
	}
	public Float getMemberBalance() {
		return memberBalance;
	}
	public void setMemberBalance(Float memberBalance) {
		this.memberBalance = memberBalance;
	}
	
	
}
